"""
author : wlingforever
file name : FO_num.py
last modified time:2022.10.30

description:
    cal number of FO
    if no target,will not create .txt in labels
"""
import os

# query working log to get image path

with open("../docs/work_log.txt", 'r', encoding="UTF-8") as f:
    image_path = f.readline()
    # print(image_path)
    image_path = image_path.strip()

# image_path = 'runs/detect/exp3'

ims_path = "D:/Projects/innovation/RFO_Detection_System/yolov5-6.2/" + image_path
num = len(os.listdir(ims_path)) - 2
print("image_in_num:")
print(num)

ims_path = "D:/Projects/innovation/RFO_Detection_System/yolov5-6.2/" + image_path + "/labels"
num = len(os.listdir(ims_path))
print("image_out_num:")
print(num)
